package com.zking.dao.mapper;


import com.zking.dao.domain.Patient;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface Patient_LoginMapper {
    @Select("select * from patient where phone = #{phone}")
   Patient queryPatient(Patient patient);
    @Select("select * from patient where name = #{name}")
    Patient queryPatientByName(Patient patient);
    @Insert("insert into patient values(null,#{name},#{password},null,#{phone},null)")
    boolean insertPatient(Patient patient);
    @Update(
            "update patient set name=#{name},sex=#{sex}," +
                    ",phone#{phone},idcard=#{idcard}"
    )
    boolean updatePatient(Patient patient);
}
